﻿<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:System="clr-namespace:System;assembly=mscorlib" 
  xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
  mc:Ignorable="d">

    <!-- ******MAIN PAGE STYLES****** -->
    <!-- **************************** -->

    <!-- Primary Color Brushes -->
    <SolidColorBrush x:Key="NavigationBackgroundColorBrush" Color="#FF564E49"/>
    <SolidColorBrush x:Key="NavigationForegroundColorBrush" Color="#FFFFFFFF"/>
    <SolidColorBrush x:Key="HighLightColorBrush" Color="#FF0097FC"/>
    <SolidColorBrush x:Key="HoverHyperlinkForegroundColorBrush" Color="#FFEBF7FF"/>
    <SolidColorBrush x:Key="HoverHyperLinkBackgroundColorBrush" Color="#FF747474"/>
    <SolidColorBrush x:Key="BodyTextColorBrush" Color="Transparent"/>

    <SolidColorBrush x:Key="BrownColorBrush" Color="#FF7E7875"/>
    <SolidColorBrush x:Key="FocusColorBrush" Color="#FF6ECBBD"/>

    <!-- MainPage Background Style -->
    <Style x:Key="MainPage_HighContrast_BackgroundStyle" TargetType="Grid">
        <Setter Property="Visibility" Value="Collapsed"/>
    </Style>

    <!-- General Grid Style -->
    <Style x:Key="GeneralGrid_HighContrast_Style" TargetType="Grid">
        <Setter Property="Visibility" Value="Visible"/>
    </Style>

    <!-- Plus Grid Style -->
    <Style x:Key="PlusGridStyle" TargetType="Grid">
        <Setter Property="Visibility" Value="Visible"/>
    </Style>
    <Style x:Key="PlusGrid_HighContrast_Style" TargetType="Grid">
        <Setter Property="Visibility" Value="Collapsed"/>
    </Style>

    <!--MainPage link styles-->
    <Style x:Key="NoteBookStyle" TargetType="Path">
        <Setter Property="Visibility" Value="Visible"/>
    </Style>
    <Style x:Key="NoteBook_HighContrast_Style" TargetType="Path">
        <Setter Property="Visibility" Value="Collapsed"/>
    </Style>
    <Style x:Key="PencilStyle" TargetType="Path">
        <Setter Property="Visibility" Value="Visible"/>
    </Style>
    <Style x:Key="Pencil_HighContrast_Style" TargetType="Path">
        <Setter Property="Visibility" Value="Collapsed"/>
    </Style>

    <!-- Navigation Grid Style -->
    <Style x:Key="NavigationGridBackground_HighContrast_Style" TargetType="Grid">
        <Setter Property="Visibility" Value="Collapsed"/>
    </Style>
    <Style x:Key="NavigationGridStyle" TargetType="Grid">
        <Setter Property="Visibility" Value="Visible"/>
        <Setter Property="Background" Value="{StaticResource BrownColorBrush}"/>
        <Setter Property="Width" Value="55"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalAlignment" Value="Right"/>
    </Style>

    <!-- Noise Grid Style -->
    <Style x:Key="NoiseGridStyle" TargetType="Grid">
        <Setter Property="Visibility" Value="Visible"/>
    </Style>
    <Style x:Key="NoiseGrid_HighContrast_Style" TargetType="Grid">
        <Setter Property="Visibility" Value="Collapsed"/>
    </Style>

    <!-- Title Text Style -->
    <Style x:Key="TitleTextStyle" TargetType="Path">
        <Setter Property="Visibility" Value="Visible"/>
        <Setter Property="StrokeThickness" Value=".5"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="VerticalAlignment" Value="Bottom"/>
        <Setter Property="Width" Value="552"/>
        <Setter Property="Height" Value="50"/>
        <Setter Property="Stretch" Value="Fill"/>
        <Setter Property="Margin" Value="20,0,0,20"/>
        <Setter Property="RenderTransformOrigin" Value=".5,.5"/>
    </Style>
    <Style x:Key="TitleText__HighContrast_Style" TargetType="Path">
        <Setter Property="Visibility" Value="Collapsed"/>
        <Setter Property="StrokeThickness" Value=".5"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="VerticalAlignment" Value="Bottom"/>
        <Setter Property="Width" Value="552"/>
        <Setter Property="Height" Value="50"/>
        <Setter Property="Stretch" Value="Fill"/>
        <Setter Property="Margin" Value="20,0,0,20"/>
        <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
    </Style>

    <!-- More Noise Grid Style -->
    <Style x:Key="MoreNoiseGridStyle" TargetType="Grid">
        <Setter Property="Visibility" Value="Visible"/>
        <Setter Property="Margin" Value="0"/>
    </Style>


    <!-- LayoutRoot Grid Style -->
    <Style x:Key="LayoutRootGridStyle" TargetType="Grid">
        <Setter Property="Background" Value="#FFFFFFFF"/>
    </Style>

    <!-- Content Border Style -->
    <Style x:Key="ContentBorderStyle" TargetType="Border">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Margin" Value="0"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
    </Style>

    <!-- Branding Border Style -->
    <Style x:Key="BrandingBorderStyle" TargetType="Border">
        <Setter Property="Visibility" Value="Collapsed"/>
    </Style>

    <!-- Branding StackPanel Style -->
    <Style x:Key="BrandingStackPanelStyle" TargetType="StackPanel">
        <Setter Property="Visibility" Value="Collapsed"/>
    </Style>

    <!-- Logo Path Style -->
    <Style x:Key="LogoIcon" TargetType="ContentControl">
        <Setter Property="Visibility" Value="Collapsed"/>
    </Style>

    <!-- ApplicationName Style -->
    <Style x:Key="ApplicationNameStyle" TargetType="TextBlock">
        <Setter Property="Visibility" Value="Collapsed"/>
    </Style>

    <!-- Links Border Style -->
    <Style x:Key="LinksBorderStyle" TargetType="Border">
        <Setter Property="Margin" Value="0,15,0,0"/>
        <Setter Property="VerticalAlignment" Value="Top"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
    </Style>

    <!-- Links StackPanel Style -->
    <Style x:Key="LinksStackPanelStyle" TargetType="StackPanel">
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="Orientation" Value="Vertical"/>
    </Style>

    <!-- Divider Style -->
    <Style x:Key="DividerStyle" TargetType="Rectangle">
        <Setter Property="Visibility" Value="Collapsed"/>
    </Style>

    <!-- ******CONTENT PAGE STYLES****** -->

    <!-- Page ScrollViewer Style -->
    <Style x:Key="PageScrollViewerStyle" TargetType="ScrollViewer">
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Margin" Value="0"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="VerticalScrollBarVisibility" Value="Hidden"/>
        <Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
        <Setter Property="Background" Value="Transparent"/>
    </Style>

    <!-- Content Panel Style -->
    <Style x:Key="ContentPanelStyle" TargetType="StackPanel">
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
    </Style>

    <!-- Header Text Style -->
    <Style x:Key="HeaderTextStyle" TargetType="TextBlock">
        <Setter Property="Visibility" Value="Collapsed"/>
    </Style>

    <!-- Content Text Style -->
    <Style x:Key="ContentTextStyle" TargetType="TextBlock">
        <Setter Property="Visibility" Value="Collapsed"/>
    </Style>

    <!-- ********STORE LISTBOX STYLES******** -->
    <!-- ******************************* -->
    <!-- Store ListBox DataTemplates -->
    <DataTemplate x:Key="StoreItemTemplate">
        <StackPanel Orientation="Horizontal" Margin="-16,0,0,0">
            <StackPanel Margin="0,-3">
                <Image Source="{Binding StoreImage}" HorizontalAlignment="Left" Height="55" Width="55"/>
            </StackPanel>
            <StackPanel Margin="3,5,8,0" Height="50" Width="213">
                <StackPanel Orientation="Horizontal" Margin="6,0,0,0">
                    <TextBlock Text="{Binding City}" FontSize="12" Foreground="White" HorizontalAlignment="Left" Width="Auto" Margin="0,0,0,0" />
                    <TextBlock Text=", " FontSize="12" Foreground="White" HorizontalAlignment="Left" Width="Auto" Margin="0,0,0,0" />
                    <TextBlock Text="{Binding StateProvince}" FontSize="12" Foreground="White" HorizontalAlignment="Left" Width="Auto" Margin="0,0,0,0" />
                </StackPanel>

                <TextBlock Text="{Binding StoreName, Converter={StaticResource UpperCaseConverter}}" Margin="5,-4,-17,4" FontSize="{Binding StoreName, Converter={StaticResource FontSizeByTextLengthConverter}}" Foreground="White" HorizontalAlignment="Stretch" Width="275"/>
            </StackPanel>
        </StackPanel>
    </DataTemplate>

    <!-- *********LISTBOX STYLES******** -->
    <!-- ******************************* -->
    <!-- ItemTemplate DataTemplate -->
    <DataTemplate x:Key="ListBoxItemTemplate">
        <StackPanel Margin="-3,2,8,0" Width="255" Height="50">
            <TextBlock Text="{Binding Position}" Margin="1,0,0,0" FontSize="12" Foreground="White" HorizontalAlignment="Stretch" Width="275"/>

            <StackPanel Orientation="Horizontal" Margin="0,-4,0,4">
                <TextBlock Text="{Binding Contact.FirstName, Converter={StaticResource UpperCaseConverter}}" FontSize="20" Foreground="White" HorizontalAlignment="Left" Width="Auto" Margin="0,0,0,0" />
                <TextBlock Text=" " FontSize="24" Foreground="White" HorizontalAlignment="Left" Width="Auto" Margin="0,0,0,0" />
                <TextBlock Text="{Binding Contact.LastName, Converter={StaticResource UpperCaseConverter}}" FontSize="20" Foreground="White" HorizontalAlignment="Left" Width="Auto" Margin="0,0,0,0" />
            </StackPanel>
        </StackPanel>
    </DataTemplate>

    <!-- ListBoxItemStyle Style -->
    <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
        <Setter Property="Padding" Value="3"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Top"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBoxItem">
                    <Grid Background="{TemplateBinding Background}" Height="55" Margin="0,3,0,5" Cursor="Hand">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="fillColor" Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0.5"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0" Value=".55"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualState x:Name="Unselected"/>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="fillColor2" Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="SelectedUnfocused">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="fillColor3" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="fillColor4" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="border" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle x:Name="fillColor1" Fill="#FFA1BD23" RadiusX="1" RadiusY="1" IsHitTestVisible="False" Margin="3,0"/>
                        <Rectangle x:Name="fillColor" Fill="#FFBADB28" RadiusX="1" RadiusY="1" IsHitTestVisible="False" Opacity="0" Margin="3,0"/>
                        <Rectangle x:Name="fillColor2" Fill="#FFBADB28" RadiusX="1" RadiusY="1" IsHitTestVisible="False" Opacity="0" Margin="3,0"/>
                        <Rectangle x:Name="fillColor3" Fill="#FFBADB28" RadiusX="1" RadiusY="1" IsHitTestVisible="False" Opacity="0" Margin="3,0"/>
                        <Rectangle x:Name="fillColor4" Fill="#FFBADB28" RadiusX="1" RadiusY="1" IsHitTestVisible="False" Opacity="0" Margin="3,0"/>
                        <Border x:Name="border" Margin="0,-3" BorderBrush="#FF5BC7E2" BorderThickness="3" Opacity="0"/>
                        <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="19,3,6,3" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" VerticalAlignment="Center"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- ***********OTHER STYLES******** -->


    <!-- TextBoxStyle Style -->
    <ControlTemplate x:Key="ValidationToolTipTemplate">
        <Grid x:Name="Root" Margin="5,0" Opacity="0" RenderTransformOrigin="0,0">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="OpenStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0"/>
                        <VisualTransition GeneratedDuration="0:0:0.2" To="Open">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                    <SplineDoubleKeyFrame KeyTime="0:0:0.2" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualTransition>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Closed">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Open">
                        <Storyboard>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="xform" Storyboard.TargetProperty="X">
                                <SplineDoubleKeyFrame KeyTime="0" Value="0"/>
                            </DoubleAnimationUsingKeyFrames>
                            <DoubleAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Opacity">
                                <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                            </DoubleAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Grid.RenderTransform>
                <TranslateTransform x:Name="xform" X="-25"/>
            </Grid.RenderTransform>
            <Border Margin="-4" Background="#052A2E31" CornerRadius="4"/>
            <Border Margin="-3" Background="#152A2E31" CornerRadius="3"/>
            <Border Margin="-2" Background="#252A2E31" CornerRadius="2"/>
            <Border Margin="-1" Background="#352A2E31"/>
            <Border Background="#FFDC000C"/>
            <Border>
                <TextBlock Margin="8,4,8,4" 
        MaxWidth="300" 
        UseLayoutRounding="false" 
        Foreground="White" 
        FontFamily="/ContosoSales;Component/Fonts/Fonts.zip#Segoe UI" 
        FontSize="24"
        Text="{Binding (Validation.Errors)[0].ErrorContent}" 
        TextWrapping="Wrap"/>
            </Border>
        </Grid>
    </ControlTemplate>
    <Style TargetType="TextBox" x:Key="BasicTextBox" />
    <Style TargetType="TextBox">
        <Setter Property="FontFamily" Value="/ContosoSales;Component/Fonts/Fonts.zip#Segoe UI"/>
        <Setter Property="FontSize" Value="18"/>
        <Setter Property="Height" Value="40"/>
        <Setter Property="MinWidth" Value="134" />
        <Setter Property="Width" Value="134"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Foreground" Value="#FF7E7875"/>
        <Setter Property="Margin" Value="0,0,15,0"/>
        <Setter Property="Padding" Value="2"/>
        <Setter Property="BorderBrush" Value="#FF7E7875"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TextBox">
                    <Grid x:Name="RootElement" Margin="-2,6,0,0">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver"/>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ReadOnly">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ReadOnlyVisualElement" Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Border1" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid"/>
                                <VisualState x:Name="InvalidUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationErrorElement" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Border2" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="InvalidFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ValidationErrorElement" Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="validationTooltip" Storyboard.TargetProperty="IsOpen">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>True</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="Border2" Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Border1" Opacity="0" BorderThickness="3" Margin="-134,-3,-20,-8" BorderBrush="#FF5BC7E2"/>
                        <Border x:Name="Border" Opacity="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="0,0,0,2" CornerRadius="1" Margin="-129,0,-15,-4">
                            <Grid Margin="134,0,0,0">
                                <Border x:Name="Border2" Opacity="1" Background="#26DB000C" BorderThickness="0,0,0,2" CornerRadius="1" Margin="-135,2,0,0" Visibility="Collapsed"/>
                                <Border x:Name="ReadOnlyVisualElement" Opacity="0" Background="#5EC9C9C9"/>
                                <Border x:Name="MouseOverBorder" BorderBrush="Transparent" BorderThickness="1">
                                    <ScrollViewer x:Name="ContentElement" BorderThickness="0" IsTabStop="False" Padding="{TemplateBinding Padding}" Margin="0,-2,0,0"/>
                                </Border>
                            </Grid>
                        </Border>
                        <Border x:Name="DisabledVisualElement" IsHitTestVisible="False" Opacity="0" Background="#A5F7F7F7" BorderBrush="#A5F7F7F7" BorderThickness="{TemplateBinding BorderThickness}"/>
                        <Border x:Name="ValidationErrorElement" BorderBrush="#FFDB000C" BorderThickness="3" Margin="-134,-3,-20,-8" Visibility="Collapsed">
                            <ToolTipService.ToolTip>
                                <ToolTip x:Name="validationTooltip" DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ValidationToolTipTemplate}" Placement="Right" PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}" Margin="-140,0,0,0">
                                    <ToolTip.Triggers>
                                        <EventTrigger RoutedEvent="Canvas.Loaded">
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="validationTooltip" Storyboard.TargetProperty="IsHitTestVisible">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <System:Boolean>true</System:Boolean>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </EventTrigger>
                                    </ToolTip.Triggers>
                                </ToolTip>
                            </ToolTipService.ToolTip>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- ButtonStyle Style -->
    <Style TargetType="Button">
        <Setter Property="HorizontalAlignment" Value="Right"/>
        <Setter Property="Width" Value="114"/>
        <Setter Property="Height" Value="36"/>
        <Setter Property="Margin" Value="0,0,15,0"/>
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Foreground" Value="#FF7E7875"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="FontFamily" Value="/ContosoSales;Component/Fonts/Fonts.zip#Segoe UI"/>
        <Setter Property="FontSize" Value="18"/>
        <Setter Property="Padding" Value="0,-1,0,0"/>
        <Setter Property="BorderThickness" Value="3"/>
        <Setter Property="BorderBrush" Value="#FF7E7875"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid x:Name="grid" Background="#02000000" Cursor="Hand" RenderTransformOrigin="0.5,0.5">
                        <Grid.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform/>
                                <SkewTransform/>
                                <RotateTransform/>
                                <TranslateTransform/>
                            </TransformGroup>
                        </Grid.RenderTransform>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="MouseOver" GeneratedDuration="00:00:00.2500000" To="Normal"/>
                                    <VisualTransition From="MouseOver" GeneratedDuration="00:00:00.0500000" To="Pressed"/>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                            <EasingDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1.075"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                            <EasingDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1.075"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1.075"/>
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="grid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="1.075"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0" Value=".55"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border Cursor="Hand" x:Name="Background" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
                        <Rectangle x:Name="FocusVisualElement" Stroke="#FF5BC7E2" StrokeThickness="3" Margin="-3" IsHitTestVisible="false" Opacity="0"/>
                        <ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
                        <Rectangle x:Name="DisabledVisualElement" Fill="#FFFFFFFF" IsHitTestVisible="false" Opacity="0"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>